﻿<%@ Page Language="C#" EnableEventValidation="false" ValidateRequest="false" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Ataric.Themester.UI._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Themester</title>
    <script language="javascript" type="text/javascript" src="Scripts/jquery-1.5.1.min.js"></script>
    <script language="javascript" type="text/javascript" src="Scripts/swfobject.js"></script>
    <script type="text/javascript" language="javascript" src="Scripts/codemirror.js"></script>
    <script type="text/javascript" language="javascript" src="Scripts/css.js"></script>
    <script type="text/javascript" language="javascript" src="Scripts/default.aspx.js"></script>
    <link type="text/css" rel="Stylesheet" href="Styles/default.css" />
    <link type="text/css" rel="Stylesheet" href="Styles/codemirror.css" />
    <link type="text/css" rel="Stylesheet" href="Styles/css.css" />
</head>
<body>
    <center>
        <form id="form1" runat="server">
            <table width="600">
            <tr>
                <td colspan="2">
                    CSS Source:
                    
                    <asp:FileUpload runat="server" ID="uploadFile"  />&nbsp;<asp:Button runat="server" ID="bntUpload" Text="Upload" />
                    <br />
                    <asp:RequiredFieldValidator runat="server" Display="dynamic" ControlToValidate="uploadFile" ErrorMessage="CSS Source file is required!" />
                    <%--<asp:RegularExpressionValidator Display="dynamic" ErrorMessage="Please select a CSS file (Ex:sample.css)" ControlToValidate="uploadFile"  ValidationExpression=".*(?i)\.css$"
                        runat="server" />--%>
                    <asp:HiddenField runat="server" ID="hiddenCurrentIndexSession" />
                </td>
                <td>
                    <asp:Button runat="server" ID="bntSave" Text="Export CSS" CausesValidation="false" />
                </td>
            </tr>
            <tr> 
                <td colspan="3">
                    <div id="error" class="error" style="display:none">
                        <asp:Literal runat="server" ID="errorMessageLiteral" />
                    </div>
                </td>
           </tr>
        </table>
            <table width="600">
            <tr>
                <td valign="top">
                    <table cellpadding="5">
                        <tr>
                            <td>
                                <h2>
                                    Source Brand</h2>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:DropDownList runat="server" Height="100%" ID="filterSource" Width="250px">
                                    <asp:ListItem Text="All" Value="*" />
                                    <asp:ListItem Text="Common (normal HTML formating)" Value="+" />
                                    <asp:ListItem Text="Class (styles starting wth a '.')" Value="." />
                                    <asp:ListItem Text="Id (styles starting with a '#')" Value="#" />
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:ListBox runat="server" ID="listSourceCSS" Rows="10" Width="250px"></asp:ListBox>
                                <div class="PreviewArea">
                                    <div id="preview1"></div>
                                    <div id="Div1" style="width:250px; padding-top:5px; overflow:auto">
                                        <textarea id="sourcePreviewer" name="sourcePreviewer" rows="3" cols="10" style="display:none">
                                        </textarea>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" id="cssPreviewContainer" style="color:Green">
                                <table style="display:none" Width="150px" id="sourcePreview">
                                    <tr>
                                        <td align="center">
                                            <p> Style Preview</p>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
                <td valign="top">
                    <table cellpadding="5">
                        <tr>
                            <td>
                                <h2>
                                    SharePoint Brand</h2>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:DropDownList runat="server" Height="100%" ID="filterSharepoint" Width="250px">
                                  
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:ListBox runat="server" Rows="10" ID="listSharepointCSS" Width="250px">
                                    
                                </asp:ListBox>
                                <div class="PreviewArea">
                                <div id="preview2"></div>
                                    <div id="Div2" style="width:250px; padding-top:5px; overflow:auto">
                                        <textarea id="sharepointPreviewer" name="sharepointPreviewer" rows="3" cols="10" style="display:none">
                                        </textarea>
                                    </div>
                                    
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" id="spPreviewContainer">
                                <img src="" border="0" id="previewImage" style="display:none"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="left" id="mergePreviewerContainer">
                                <strong>After</strong>
                                <div id="Div3" style="width:250px; padding-top:5px; overflow:auto">
                                        <textarea id="mergePreviewer" name="mergePreviewer" rows="3" cols="10" style="display:none">
                                        </textarea>
                                    </div>
                            </td>
                        </tr>

                        
                    </table>
                </td>
                <td valign="top">
                 <table cellpadding="2">
                        <tr>
                            <td style="height:150px">
                              
                            </td>
                        </tr>
                        <tr>
                            <td>
                                 <input type="button" value=">>" id="add"/> <br />
                                 <input type="button" value="<<" id="remove" />
                            </td>
                        </tr>
                        </table>
                </td>
                <td valign="top">
                    <table cellpadding="5">
                        <tr>
                            <td>
                                <h2>Mapping<h2>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:ListBox runat="server" Rows="19" ID="listMappingCSS" Height="100%" Width="300px" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
            <div style="display:none">
                <input type="hidden" id="_mappings" runat="server"/>
                <div id="flashContent" style="width:100%; float:left" >
            </div>
        </form>
    </center>
</body>


</html>
